#ifndef __DHT11_H_
#define __DHT11_H_

#include <at32f4xx.h>
#include "Mydelay.h"

#ifndef uchar
#define uchar unsigned char
#endif

#ifndef uint 
#define uint unsigned int
#endif

#define OK 1
#define ERROR 0

extern uchar tempstr[];
extern uchar humistr[];


#define PORT_DHT11              GPIOB
#define PIN_DHT11               GPIO_Pins_9

#define DHT11_OUT_HIGH              (PORT_DHT11->BRE  = PIN_DHT11 )
#define DHT11_OUT_LOW               (PORT_DHT11->BRE  = PIN_DHT11 )

void DHT11_Init(void);
uchar ReadValue_DHT11(uchar * temp,uchar * humi);
void Temp_HumiToStr(uchar tempdat,uchar humidat);

#endif
